package org.joe.chinachess.ui;

import javax.swing.*;
import java.awt.*;

/**
 * 聊天对话框
 * 
 * @author Joe
 * 
 */
public class ChatPanel extends JPanel {

	private JButton sendButton;
	private JTextField textField;
	private JTextArea textArea;

	public ChatPanel() {
		this.sendButton = new JButton("发送消息");
		this.textField = new JTextField();
		this.textArea = new JTextArea();
		this.setLayout(new BorderLayout(0, 0));
		this.add(new JScrollPane(this.textArea), BorderLayout.CENTER);

		JPanel panel = new JPanel();
		panel.setLayout(new BorderLayout());
		panel.add(this.textField, BorderLayout.NORTH);
		panel.add(this.sendButton, BorderLayout.SOUTH);

		this.add(panel, BorderLayout.SOUTH);
	}
}
